<?php
/**
 * 
 * 用在查询
 * @author zjm
 *
 */
class CategoryViewModel extends ViewModel{
	
	public $viewFields = array(
		//需要取哪些表的数据,就写上哪些表
		'Category' => array(
			'id' => 'cid', //取别名
			'title' => 'ctitle',
			'alias' => 'calias',
			'published' => 'cpublished',
			'order' => 'corder',
			'access' => 'caccess',
			'sectionid',
		),
		'Section' => array(
			'id' => 'sid', //取别名
			'title' => 'sec_name',
			//关联条件
			'_on' => 'Category.sectionid=Section.id',
		),
	);
	
	
}

?>